/** @file rect_list.h
 * @brief 
 * @author - Robert Zhang <armner@gmail.com>
 *         - Heynie Yao<aheynie@gamil.com>
 * @date 
 * @version 1.0.0
 * @note
 */
#ifndef	_RECT_LIST_H_
#define	_RECT_LIST_H_

#include "frgui.h"

#define min(x,y)   ((x)>(y))? y:x/**< @def min(x,y) */
#define max(x,y)   ((x)>(y))? x:y/**< @def max(x,y) */

/** @class RectList rect_list.h "gdi/rect_list.h"
 * @brief
 */
class RectList
{
public:
    RectList *next;//< next rectangular
    RectList *prev;//< prev rectangular
    Rect *rect;
    HWND hWnd;//< window handle

    RectList(Rect *rect, RectList *next, HWND h);/**< @brief constructor */ 
    RectList(Rect *rect);/**< @brief destructor */ 
    ~RectList();/**< @brief destructor */

    RectList *addRect(Rect *r,HWND hWnd);/**< @brief add a rectangular to window */
    RectList *removeRect(Rect *r);/**< @brief remove a rectangular from window */
    RectList *findRect(Rect *r);/**< @brief find rectangular */

    void operator delete(void *);/**< @brief operator 'delete' definitions  */ 
    void *operator new(unsigned int len);/**< @brief operator 'new' definitions  */    
};


#endif

